﻿using HamcoWcs.Models.NodeInfos;
using HamcoWcs.Models.PathInfos;
using HamcoWcs.Models.WcsLocations;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace HamcoWcs.Contract.ContractCommon
{
    public interface IPathService 
    {
        string CountPath();
        PathInfoDto GetPath(string from, string to);
        Dictionary<string, PathInfoDto> GetAllPath();
        NodeInfoDto GetWmsNode(string nodeName);
        NodeInfoDto GetSrmNode(string nodeName);
        NodeInfoDto GetWcsNode(string nodeName);
        WcsLocationDto GetLocation(string locName);

        void Synchronous();

        /// <summary>
        /// 重置Path的子路径
        /// </summary>
        void ReRoutePathEdges();
        void ReRoutePathEdges(string pathName);

        void AddErrorNode(string nodeName);

        void RemoveErrorNode(string nodeName);
        //List<PathNodeErrorInfo> GetErrorNode();

        /// <summary>
        /// 后台每隔一定时间调用，检查异常节点存在时更换备用路径
        /// </summary>
        void CalcRoute();

        void RerouteTask();

        bool TogglePath();
    }
}
